#!/bin/sh

mkdir -p %OPTWARE_TARGET_PREFIX%/etc/gtk-3.0
mkdir -p %OPTWARE_TARGET_PREFIX%/etc/gtk-2.0

echo "Configure gdk-pixbuf loaders"
rm -f %OPTWARE_TARGET_PREFIX%/etc/gtk-3.0/gdk-pixbuf.loaders
%OPTWARE_TARGET_PREFIX%/bin/gdk-pixbuf-query-loaders > %OPTWARE_TARGET_PREFIX%/etc/gtk-3.0/gdk-pixbuf.loaders
rm -f %OPTWARE_TARGET_PREFIX%/etc/gtk-2.0/gdk-pixbuf.loaders
%OPTWARE_TARGET_PREFIX%/bin/gdk-pixbuf-query-loaders > %OPTWARE_TARGET_PREFIX%/etc/gtk-2.0/gdk-pixbuf.loaders

cd %OPTWARE_TARGET_PREFIX%/share/gir-1.0

echo "Generating %OPTWARE_TARGET_PREFIX%/lib/girepository-1.0/Rsvg-2.0.typelib"
PATH="%OPTWARE_TARGET_PREFIX%/bin:$PATH" g-ir-compiler --includedir=. Rsvg-2.0.gir -o %OPTWARE_TARGET_PREFIX%/lib/girepository-1.0/Rsvg-2.0.typelib
